<?php
	$page=$_SERVER['REQUEST_URI'];	
	$url = "login";
	$url1 = "register";
	$home='';
	if(strpos($page, $url) !== false){
		$home="login";
	}
	if(strpos($page, $url1) !== false){
		$home="register";
	}
	if($page==$this->Url('forget-password',array('action' => 'forget-password'))){
		$home="forgetpassword";
	}
	if($page==$this->Url('settings',array('action' => 'settings'))){
		$home="settings";
	}
?>
<div class="ui-widget c_flag_re" id="flagContainer"  onclick="bollFun()"> 
	<div id="flagHolder" class="seting_flag">
	<?php if($home=='login'){ ?>
		 <a id="img">
		 <?php if(isset($_COOKIE['Rid'])){ ?>
		 <img src="<?php echo $this->basePath(); ?>/uploads/<?php echo $_COOKIE['Rid']; ?>" class="img_w"><?php echo $_COOKIE['Rid1']; ?></a>
		<?php }else{	?>
		 <img src="<?php echo $this->basePath(); ?>/uploads/India_1.png" class="img_w">India(+91)</a>
	 <?php } }else if($home=='register'){  ?>
		 <a id="img">
		 <img src="<?php echo $this->basePath(); ?>/uploads/India_1.png" class="img_w">India(+91)</a>
	 <?php }else if($home=='forgetpassword'){ ?>
		<a id="img">
		 <img src="<?php echo $this->basePath(); ?>/uploads/India_1.png" class="img_w">India(+91)</a>
	 <?php } else if($home=='settings'){  ?>
		 <a id="img">
		 <img src="<?php echo $this->basePath(); ?>/uploads/India_1.png" class="img_w">India(+91)</a>
		 <?php } ?>
	</div>
</div>
<div style="display:none;position:relative;" id="ram">
<span style="position:absolute;top:0;left:0; padding:5px;" id="s_icon"><img style="width:18px;" src="<?php echo $this->basePath(); ?>/images/1395500590_search_1.png"/></span>
    <input type="text"id="tags" class="c_flag_in" placeholder="Search...." style="padding-left:20px;width:90px;" onblur="showFlag();"/>
	<input type="hidden" id="tagValue" name="tagValue" value="India-Flag-24.png">
</div>
<script>
	var imagePath="<?php echo $this->basePath(); ?>";
(function( $ ) {
var proto = $.ui.autocomplete.prototype,
   initSource = proto._initSource;

function filter( array, term ) {
   var matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), "i" );
   return $.grep( array, function(value) {
       return matcher.test( $( "<div>" ).html( value.label || value.value || value ).text() );
   });
}

$.extend( proto, {
   _initSource: function() {
       if ( this.options.html && $.isArray(this.options.source) ) {
           this.source = function( request, response ) {
               response( filter( this.options.source, request.term ) );
           };
       } else {
           initSource.call( this );
       }
   },

   _renderItem: function( ul, item) {
       return $( "<li></li>" )
           .data( "item.autocomplete", item )
           .append( $( "<a></a>" )[ this.options.html ? "html" : "text" ]( item.label ) )
           .appendTo( ul );
   }
});
})( jQuery );
	
$(function() {
       var availableTags = [
          { label: '<img class="img_w" src="'+imagePath+'/uploads/Afghanistan-Flag-24.png" >Afghanistan (+93)', value:'Afghanistan-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Albania-Flag-24.png" >Albania (+355)', value:'Albania-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Algeria-Flag-24.png" >Algeria (+213)', value:'Algeria-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/American-Samoa-24.png" >American Samoa (+1684)', value:'American-Samoa-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Andorra-Flag-24.png" >Andorra (+376)', value:'Andorra-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Angola-Flag-24.png" >Angola (+244)', value:'Angola-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Anguilla-Flag-24.png" >Anguilla (+1264)', value:'Anguilla-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Antarctica-24.png" >Antarctica (+672)', value:'Antarctica-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Antigua-and-Barbuda-24.png" >Antigua And Barbuda(+1268)', value:'Antigua-and-Barbuda-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Argentina-Flag-24.png" >Argentina (+54)', value:'Argentina-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Armenia-Flag-24.png" >Armenia (+374)', value:'Armenia-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Aruba-24.png" >Aruba (+297)', value:'Aruba-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Australia-Flag-24.png" >Australia (+61)', value:'Australia-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Austria-Flag-24.png" >Austria (+43)', value:'Austria-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Azerbaijan-Flag-24.png" >Azerbaijan (+994)', value:'Azerbaijan-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/bahamas.png" >Bahamas (+1242)', value:'bahamas.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Bahrain-Flag-24.png" >Bahrain (+973)', value:'Bahrain-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Bangladesh-Flag-24.png" >Bangladesh (+880)', value:'Bangladesh-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Barbados-Flag-24.png" >Barbados (+1246)', value:'Barbados-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Belarus-Flag-24.png" >Belarus (+375)', value:'Belarus-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Belgium-Flag-24.png" >Belgium (+32)', value:'Belgium-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Belize-Flag-24.png" >Belize (+501)', value:'Belize-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Benin-Flag-24.png" >Benin (+229)', value:'Benin-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Bermuda-24.png" >Bermuda (+1441)', value:'Bermuda-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Bhutan-Flag-24.png" >Bhutan (+975)', value:'Bhutan-Flag-24.png' },
		   { label: '<img class="img_w" src="'+imagePath+'/uploads/Bolivia-Flag-24.png" >Bolivia (+591)', value:'Bolivia-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Bosnian-Flag-24.png" >Bosnia and Herzegovina (+387)', value:'Bosnian-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Botswana-Flag-24.png" >Botswana (+267)', value:'Botswana-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Brazil-Flag-24.png" >Brazil (+55)', value:'Brazil-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Brunei-Flag-24.png" >Brunei Darussalam (+673)', value:'Brunei-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Bulgaria-Flag-24.png" >Bulgaria (+359)', value:'Bulgaria-Flag-24.png' },
		   { label: '<img class="img_w" src="'+imagePath+'/uploads/Burkina-Faso-Flag-24.png" >Burkina Faso (+226)', value:'Burkina-Faso-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Burundi-Flag-24.png" >Burundi (+257)', value:'Burundi-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Cambodia-Flag-24.png" >Cambodia (+855)', value:'Cambodia-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Cameroon-Flag-24.png" >Cameroon (+237)', value:'Cameroon-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Canada-Flag-24.png" >Canada (+1)', value:'Canada-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Cape-Verde-Flag-24.png" >Cape Verde (+238)', value:'Cape-Verde-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Cayman-Islands-24.png" >Cayman Islands (+1345)', value:'Cayman-Islands-24.png' },
		 { label: '<img class="img_w" src="'+imagePath+'/uploads/Chad-Flag-24.png" >Chad (+235)', value:'Chad-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Chile-Flag-24.png" >Chile (+56)', value:'Chile-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/China-Flag-24.png" >China (+86)', value:'China-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Colombia-Flag-24.png" >Colombia (+57)', value:'Colombia-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Comoros-Flag-24.png" >Comoros (+269)', value:'Comoros-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Congo-Flag-24.png" >Congo (+242)', value:'Congo-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Cook-Islands-24.png" >Cook Islands (+682)', value:'Cook-Islands-24.png' },	
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Costa-Rica-Flag-24.png" >Costa Rica (+506)', value:'Costa-Rica-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Croatian-Flag-24.png" >Croatia (+385)', value:'Croatian-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Cuba-Flag-24.png" >Cuba (+53)', value:'Cuba-Flag-24.png' },	
		   { label: '<img class="img_w" src="'+imagePath+'/uploads/Cyprus-Flag-24.png" >Cyprus (+357)', value:'Cyprus-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Czech-Republic-Flag-24.png" >Czech Republic (+420)', value:'Czech-Republic-Flag-24.png' },	
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Djibouti-Flag-24.png" >Djibouti (+253)', value:'Djibouti-Flag-24.png' },	
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Dominicana-24.png" >Dominica (+1767)', value:'Dominicana-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Dominican-Republic-Flag-24.png" >Dominican Republic (+1809)', value:'Dominican-Republic-Flag-24.png' },	 { label: '<img class="img_w" src="'+imagePath+'/uploads/Ecuador-Flag-24.png" >Ecuador (+593)', value:'Ecuador-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/El-Salvador-Flag-24.png" >El Salvador (+503)', value:'El-Salvador-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Equatorial-Guinea-Flag-24.png" >Equatorial Guinea (+240)', value:'Equatorial-Guinea-Flag-24.png' },	
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Eritrea-Flag-24.png" >Eritrea (+291)', value:'Eritrea-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Estonia-24.png" >Estonia (+372)', value:'Estonia-24.png' },	
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Ethiopia-Flag-24.png" >Ethiopia (+251)', value:'Ethiopia-Flag-24.png' },	
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Falkland-Islands-24.png" >Falkland Islands (Malvinas) (+500)', value:'Falkland-Islands-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Faroe-Islands-24.png" >Faroe Islands (+298)', value:'Faroe-Islands-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Fiji-Flag-24.png" >Fiji (+679)', value:'Fiji-Flag-24.png' },	
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Finland-Flag-24.png" >Finland (+358)', value:'Finland-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/France-Flag-24.png" >France (+33)', value:'France-Flag-24.png' },
		   { label: '<img class="img_w" src="'+imagePath+'/uploads/French-Polynesia-24.png" >French Polynesia (+689)', value:'French-Polynesia-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Gabon-Flag-24.png" >Gabon (+241)', value:'Gabon-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Gambia-Flag-24.png" >Gambia (+220)', value:'Gambia-Flag-24.png' },	
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Georgia-Flag-24.png" >Georgia (+995)', value:'Georgia-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Germany-Flag-24.png" >Germany (+49)', value:'Germany-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Ghana-Flag-24.png" >Ghana (+233)', value:'Ghana-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Gibraltar-Flag-24.png" >Gibraltar (+350)', value:'Gibraltar-Flag-24.png' },	
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Greece-Flag-24.png" >Greece (+30)', value:'Greece-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Greenland-Flag-24.png" >Greenland (+299)', value:'Greenland-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Guadeloupe-24.png" >Guadeloupe (+590)', value:'Guadeloupe-24.png' },	
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Guam-Flag-24.png" >Guam (+1671)', value:'Guam-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Guatemala-Flag-24.png" >Guatemala (+502)', value:'Guatemala-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Guinea-Flag-24.png" >Guinea (+224)', value:'Guinea-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Guinea-Bissau-Flag-24.png" >Guinea-Bissau (+245)', value:'Guinea-Bissau-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Guyana-Flag-24.png" >Guyana (+592)', value:'Guyana-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Haiti-Flag-24.png" >Haiti (+509)', value:'Haiti-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Holy-see-Flag-24.png" >Holy See(Vatican City State) (+39)', value:'Holy-see-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Honduras-Flag-24.png" >Honduras (+504)', value:'Honduras-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Hong-Kong-Flag-24.png" >Hong Kong (+852)', value:'Hong-Kong-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Hungary-Flag-24.png" >Hungary (+36)', value:'Hungary-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Iceland-Flag-24.png" >Iceland (+354)', value:'Iceland-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/India-Flag-24.png" >India (+91)', value:'India-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Indonesia-Flag-24.png" >Indonesia (+62)', value:'Indonesia-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Iraq-Flag-24.png" >Iraq (+964)', value:'Iraq-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Israel-Flag-24.png" >Israel (+972)', value:'Israel-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Italy-Flag-24.png" >Italy (+39)', value:'Italy-Flag-24.png' },
		  { label: '<img class="img_w" src="'+imagePath+'/uploads/Japan-Flag-24.png" >Japan (+81)', value:'Japan-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Jordan-Flag-24.png" >Jordan (+962)', value:'Jordan-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Kazakhstan-Flag-24.png" >Kazakhstan (+7)', value:'Kazakhstan-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Kenya-Flag-24.png" >Kenya (+254)', value:'Kenya-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Kiribati-24.png" >Kiribati (+686)', value:'Kiribati-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Korea-Flag-24.png" >Korea Democratic Peoples Republic of (+850)', value:'Korea-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Kuwait-Flag-24.png" >Kuwait (+965)', value:'Kuwait-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Kyrgyzstan-Flag-24.png" >Kyrgyzstan (+996)', value:'Kyrgyzstan-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Laos-Flag-24.png" >Lao Peoples Democratic Republic (+856)', value:'Laos-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Lebanon-Flag-24.png" >Lebanon (+961)', value:'Lebanon-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Lesotho-Flag-24.png" >Lesotho (+266)', value:'Lesotho-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Liberia-Flag-24.png" >Liberia (+231)', value:'Liberia-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Liechtenstein-Flag-24.png" >Liechtenstein (+423)', value:'Liechtenstein-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Lithuania-Flag-24.png" >Lithuania (+370)', value:'Lithuania-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Luxembourg-Flag-24.png" >Luxembourg (+352)', value:'Luxembourg-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Macedonia-Flag-24.png" >Macedonia The Former Yugoslav Republic Of (+389)', value:'Macedonia-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Madagascar-Flag-24.png" >Madagascar (+261)', value:'Madagascar-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Malawi-Flag-24.png" >Malawi (+265)', value:'Malawi-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Angola-Flag-24.png" >Maldives (+960)', value:'Angola-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Mali-Flag-24.png" >Mali (+223)', value:'Mali-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Malta-Flag-24.png" >Malta (+356)', value:'Malta-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Marshall-Islands-Flag-24.png" >Marshall Islands (+692)', value:'Marshall-Islands-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Martinique-24.png" >Martinique (+596)', value:'Martinique-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Mauritania-Flag-24.png" >Mauritania (+222)', value:'Mauritania-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Mauritius-Flag-24.png" >Mauritius (+230)', value:'Mauritius-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Mayotte-Flag-24.png" >Mayotte (+262)', value:'Mayotte-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Mexico-Flag-24.png" >Mexico (+52)', value:'Mexico-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Micronesia-Flag-24.png" >Micronesia Federated States of (+691)', value:'Micronesia-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Moldova-Flag-24.png" >Moldova Republic of (+373)', value:'Moldova-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Monaco-Flag-24.png" >Monaco (+377)', value:'Monaco-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Mongolia(+976)" >Mongolia (+976)', value:'Mongolia(+976)' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Montserrat-Flag-24.png" >Montserrat (+1664)', value:'Montserrat-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Morocco-Flag-24.png" >Morocco (+212)', value:'Morocco-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Mozambique-Flag-24.png" >Mozambique (+258)', value:'Mozambique-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Myanmar-24.png" >Myanmar (+95)', value:'Myanmar-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Nepal-Flag-24.png" >Nepal (+977)', value:'Nepal-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Namibia-Flag-24.png" >Namibia (+264)', value:'Namibia-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Nauru-Flag-24.png" >Nauru (+674)', value:'Nauru-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Netherlands-Flag-24.png" >Netherlands (+31)', value:'Netherlands-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/New-Caledonia-Flag-24.png" >New Caledonia (+687)', value:'New-Caledonia-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Nicaragua-Flag-24.png" >Nicaragua (+505)', value:'Nicaragua-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Niger-Flag-24.png" >Niger (+227)', value:'' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Nigeria-Flag-24.png" >Nigeria (+234)', value:'Nigeria-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Niue-Flag-24.png" >Niue (+683)', value:'Niue-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Northern-Ireland-24.png" >Northern Mariana Islands (+1670)', value:'Northern-Ireland-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Norway-Flag-24.png" >Norway (+47)', value:'Norway-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Oman-Flag-24.png" >Oman (+968)', value:'Oman-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Pakistan-Flag-24.png" >Pakistan (+92)', value:'Pakistan-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Palau-Flag-24.png" >Palau (+680)', value:'Palau-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Panama-Flag-24.png" >Panama (+507)', value:'Panama-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Papua-New-Guinea-Flag-24.png" >Papua New Guinea (+675)', value:'Papua-New-Guinea-Flag-24.png' },{ label: '<img class="img_w" src="'+imagePath+'/uploads/Paraguay-Flag-24.png" >Paraguay (+595)', value:'Paraguay-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Peru-Flag-24.png" >Peru (+51)', value:'Peru-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Philippines-Flag-24.png" >Philippines (+63)', value:'Philippines-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Poland-Flag-24.png" >Poland (+48)', value:'Poland-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Portugal-Flag-24.png" >Portugal (+351)', value:'Portugal-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Puerto-Rico-Flag-24.png" >Puerto Rico (+1)', value:'Puerto-Rico-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Qatar-Flag-24.png" >Qatar (+974)', value:'Qatar-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Reunion-24.png" >Réunion (+262)', value:'Reunion-24.png' },				
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Romania-Flag-24.png" >Romania (+40)', value:'Romania-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Russia-Flag-24.png" >Russian Federation (+7)', value:'Russia-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Rwanda-Flag-24.png" >Rwanda (+250)', value:'Rwanda-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Saint-Helena-Flag-24.png" >Saint Helena (+290)', value:'Saint-Helena-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Saint-Lucia-Flag-24.png" >Saint Lucia (+1758)', value:'Saint-Lucia-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Samoa-Flag-24.png" >Samoa (+685)', value:'Samoa-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/San-Marino-Flag-24.png" >San Marino (+378)', value:'San-Marino-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Saudi-Arabia-Flag-24.png" >Saudi Arabia (+966)', value:'Saudi-Arabia-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Senegal-Flag-24.png" >Senegal (+221)', value:'Senegal-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Serbia-Flag-24.png" >Serbia (+381)', value:'Serbia-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Seychelles-Flag-24.png" >Seychelles (+248)', value:'Seychelles-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Sierra-Leone-Flag-24.png" >Sierra Leone (+232)', value:'Sierra-Leone-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Singapore-Flag-24.png" >Singapore (+65)', value:'Singapore-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Slovakia-Flag-24.png" >Slovakia (+421)', value:'Slovakia-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Slovenia-Flag-24.png" >Slovenia (+386)', value:'Slovenia-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Solomon-Islands-Flag-24.png" >Solomon Islands (+677)', value:'Solomon-Islands-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Somalia-Flag-24.png" >Somalia (+252)', value:'Somalia-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/South-Africa-Flag-24.png" >South Africa (+27)', value:'South-Africa-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Spain-Flag-24.png" >Spain (+34)', value:'Spain-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Sri-Lanka-Flag-24.png" >Sri Lanka (+94)', value:'Sri-Lanka-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Sudan-Flag-24.png" >Sudan (+249)', value:'Sudan-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Suriname-Flag-24.png" >Suriname (+597)', value:'Suriname-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Swaziland-Flag-24.png" >Swaziland (+268)', value:'Swaziland-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Switzerland-Flag-24.png" >Switzerland (+41)', value:'Switzerland-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Syria-Flag-24.png" >Syrian Arab Republic (+963)', value:'Syria-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Taiwan-Flag-24.png" >Taiwan (+886)', value:'Taiwan-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Tajikistan-Flag-24.png" >Tajikistan (+992)', value:'Tajikistan-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Tanzania-Flag-24.png" >Tanzania United Republic of (+255)', value:'Tanzania-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Thailand-Flag-24.png" >Thailand (+66)', value:'Thailand-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Timor-Leste-Flag-24.png" >Timor-Leste (+670)', value:'Timor-Leste-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Togo-Flag-24.png" >Togo (+228)', value:'Togo-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Tonga-Flag-24.png" >Tonga (+676)', value:'Tonga-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Trinidad-and-Tobago-24.png" >Trinidad and Tobago (+1868)', value:'Trinidad-and-Tobago-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Tunisia-Flag-24.png" >Tunisia (+216)', value:'Tunisia-Flag-24.png' },	
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Turkey-Flag-24.png" >Turkey (+90)', value:'Turkey-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Turkmenistan-Flag-24.png" >Turkmenistan (+993)', value:'Turkmenistan-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Tuvalu-Flag-24.png" >Tuvalu (+688)', value:'Tuvalu-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Uganda-Flag-24.png" >Uganda (+256)', value:'Uganda-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Ukraine-Flag-24.png" >Ukraine (+380)', value:'Ukraine-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/United-Arab-Emirates-24.png" >United Arab Emirates (+971)', value:'United-Arab-Emirates-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/United-Kingdom-flag-24.png" >United Kingdom (+44)', value:'United-Kingdom-flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/United-States-Flag-24.png" >United States (+1)', value:'United-States-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Vanuatu-Flag-24.png" >Vanuatu (+678)', value:'Vanuatu-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Uzbekistan-Flag-24.png" >Uzbekistan (+998)', value:'Uzbekistan-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Venezuela-Flag-24.png" >Venezuela (+58)', value:'Venezuela-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Vietnam-Flag-24.png" >Vietnam (+84)', value:'Vietnam-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Wallis-and-Futuna-Flag-24.png" >Wallis and Futuna (+681)', value:'Wallis-and-Futuna-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Yemen-Flag-24.png" >Yemen (+967)', value:'Yemen-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Zambia-Flag-24.png" >Zambia (+260)', value:'Zambia-Flag-24.png' },
			{ label: '<img class="img_w" src="'+imagePath+'/uploads/Zimbabwe-Flag-24.png" >Zimbabwe (+263)', value:'Zimbabwe-Flag-24.png' },
		];
       $( "#tags" ).autocomplete({
			source: availableTags,
			html: 'html',
			select: function (event, ui){ 
			var selectedObj = ui.item;
			$('#tagValue').val(selectedObj.value);
			var value=selectedObj.value;
			$('#flagHolder').html('<a id="img">'+selectedObj.label+'</a>') 
			$('#flagContainer').show();
			$('#tags').attr('placeholder', 'Search..'); 
			$('#ram').hide();
			selectedObj.value='';
		}
      });
});
function fun(){
	$('#tags').val('');
	$('#ram').show();
} 
function bollFun(){
	$('#ram').show();
	$('#flagContainer').hide();
	$('#tags').focus(); 
}
function showFlag() {
	$('#flagContainer').show();
	$('#ram').hide();
}
</script>
